package com.netease.i;

import java.io.IOException;
import java.io.OutputStream;

public class b extends OutputStream
{
  private static Object[] b = new Object[0];
  private static int c = 0;
  private static int d = 0;
  private static c e;
  private static long f = 0L;
  private static final int g = 2;
  OutputStream a;
  private int h;
  private int i;
  private int j;
  private long k;
  private c l;

  public b(OutputStream paramOutputStream)
  {
    if (paramOutputStream == null)
      throw new IllegalArgumentException("out is null");
    this.a = paramOutputStream;
    this.k = System.currentTimeMillis();
  }

  public static void a()
  {
    synchronized (b)
    {
      c = d >> 2;
      d = 0;
      if (e != null)
        e.a(4, c);
      return;
    }
  }

  // ERROR //
  private void a(int paramInt)
  {
    // Byte code:
    //   0: iload_1
    //   1: ifle +88 -> 89
    //   4: aload_0
    //   5: monitorenter
    //   6: aload_0
    //   7: iload_1
    //   8: aload_0
    //   9: getfield 68	com/netease/i/b:h	I
    //   12: iadd
    //   13: putfield 68	com/netease/i/b:h	I
    //   16: aload_0
    //   17: iload_1
    //   18: aload_0
    //   19: getfield 70	com/netease/i/b:j	I
    //   22: iadd
    //   23: putfield 70	com/netease/i/b:j	I
    //   26: aload_0
    //   27: monitorexit
    //   28: getstatic 31	com/netease/i/b:b	[Ljava/lang/Object;
    //   31: astore_3
    //   32: aload_3
    //   33: monitorenter
    //   34: getstatic 37	com/netease/i/b:f	J
    //   37: iload_1
    //   38: i2l
    //   39: ladd
    //   40: putstatic 37	com/netease/i/b:f	J
    //   43: iload_1
    //   44: getstatic 35	com/netease/i/b:d	I
    //   47: iadd
    //   48: putstatic 35	com/netease/i/b:d	I
    //   51: aload_3
    //   52: monitorexit
    //   53: aload_0
    //   54: getfield 72	com/netease/i/b:l	Lcom/netease/i/c;
    //   57: ifnull +15 -> 72
    //   60: aload_0
    //   61: getfield 72	com/netease/i/b:l	Lcom/netease/i/c;
    //   64: bipush 6
    //   66: iload_1
    //   67: invokeinterface 74 3 0
    //   72: getstatic 60	com/netease/i/b:e	Lcom/netease/i/c;
    //   75: ifnull +14 -> 89
    //   78: getstatic 60	com/netease/i/b:e	Lcom/netease/i/c;
    //   81: bipush 8
    //   83: iload_1
    //   84: invokeinterface 74 3 0
    //   89: return
    //   90: astore_2
    //   91: aload_0
    //   92: monitorexit
    //   93: aload_2
    //   94: athrow
    //   95: astore 4
    //   97: aload_3
    //   98: monitorexit
    //   99: aload 4
    //   101: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   6	28	90	finally
    //   91	93	90	finally
    //   34	53	95	finally
    //   97	99	95	finally
  }

  public static void a(long paramLong)
  {
    f = paramLong;
  }

  public static void b(c paramc)
  {
    e = paramc;
  }

  public static int e()
  {
    return c;
  }

  public static long f()
  {
    return f;
  }

  public void a(c paramc)
  {
    this.l = paramc;
  }

  public void b()
  {
    monitorenter;
    try
    {
      this.h = (this.i >> 2);
      this.i = 0;
      monitorexit;
      if (this.l != null)
        this.l.a(2, this.h);
      return;
    }
    finally
    {
      monitorexit;
    }
    throw localObject;
  }

  public int c()
  {
    return this.h;
  }

  public void close()
  {
    if (this.a != null);
    try
    {
      this.a.close();
      super.close();
      label18: this.a = null;
      return;
    }
    catch (IOException localIOException)
    {
      break label18;
    }
  }

  public int d()
  {
    long l1 = (System.currentTimeMillis() - this.k) / 1000L;
    if (l1 <= 0L)
      l1 = 1L;
    return (int)(this.j / l1);
  }

  public void write(int paramInt)
  {
    this.a.write(paramInt);
    a(1);
  }

  public void write(byte[] paramArrayOfByte)
  {
    write(paramArrayOfByte, 0, paramArrayOfByte.length);
  }

  public void write(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  {
    this.a.write(paramArrayOfByte, paramInt1, paramInt2);
    a(paramInt2);
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.i.b
 * JD-Core Version:    0.6.0
 */